<!--[pnajaxheader modname="crpCalendar" filename=crpcalendar.js noscriptaculous=true nobehaviour=true]-->
<!--[pnpageaddvar name="javascript" value="modules/crpCalendar/pnjavascript/datepicker/datepicker.js"]-->
<!--[pnpageaddvar name="stylesheet" value="modules/crpCalendar/pnjavascript/datepicker/css/datepicker.css"]-->

<!--[include file="crpcalendar_user_menu.htm"]-->
<!--[gt text="Submit event" assign=templatetitle]-->

<div class="z-frontendcontainer">
    <div><!--[pnimg modname='core' src='edit.gif' set='icons/large' alt=$templatetitle]--></div>
    <h2><!--[$templatetitle]--></h2>
    <form class="z-form" action="<!--[pnmodurl modname="crpCalendar" type="user" func="create"]-->" method="post" enctype="multipart/form-data">
        <div>
            <input type="hidden" name="authid" value="<!--[insert name='generateauthkey' module='crpCalendar']-->" />
            <fieldset>
                <legend><!--[gt text="Content"]--></legend>
                <div class="z-formrow">
                    <label for="event_title"><!--[gt text="Title"]--> <span class="z-mandatorysym">*</span></label>
                    <input id="event_title" class="z-form-text" name="event[title]" type="text" size="32" maxlength="255" value="<!--[$title|pnvarprephtmldisplay]-->" />
                </div>
                <div class="z-formrow">
                    <label for="event_urltitle"><!--[gt text="PermaLink URL title"]--></label>
                    <input id="event_urltitle" class="z-form-text" name="event[urltitle]" type="text" size="32" maxlength="255" value="<!--[$urltitle|pnvarprepfordisplay]-->" />
                    <em class="z-formnote"><!--[gt text="(Blank = auto-generate)"]--></em>
                </div>
                <div class="z-formrow">
                    <label for="event_location"><!--[gt text="Location"]--></label>
                    <input id="event_location" class="z-form-text" name="event[location]" type="text" size="32" maxlength="255" value="<!--[$location|pnvarprephtmldisplay]-->" />
                </div>
                <!--[if $enable_locations && pnModAvailable('locations')]-->
                <div class="z-formrow">
                    <label for="event_locations"><!--[gt text="from Locations module"]--></label>
                    <!--[html_options values=$avail.values output=$avail.output name="event[locations]" selected=$locations]-->
                </div>
                <!--[/if]-->
                <div class="z-formrow">
                    <label for="event_url"><!--[gt text="URL (with http://)"]--></label>
                    <input id="event_url" class="z-form-text" name="event[url]" type="text" size="32" maxlength="255" value="<!--[$url|pnvarprephtmldisplay]-->" />
                </div>
                <div class="z-formrow">
                    <label for="event_contact"><!--[gt text="Contact"]--></label>
                    <input id="event_contact" class="z-form-text" name="event[contact]" type="text" size="32" maxlength="255" value="<!--[$contact|pnvarprephtmldisplay]-->" />
                </div>
                <div class="z-formrow">
                    <label for="event_organiser"><!--[gt text="Organiser"]--></label>
                    <input id="event_organiser" class="z-form-text" name="event[organiser]" type="text" size="32" maxlength="255" value="<!--[$organiser|pnvarprephtmldisplay]-->" />
                </div>
                <!--[if $enablecategorization]-->
                <div class="z-formrow">
                    <label for="event_category_cat_val"><!--[gt text="Category"]--> <span class="z-mandatorysym">*</span></label>
                    <!--[selector_category category=$mainCategory name="event[__CATEGORIES__][Main]" field="id" selectedValue=$__CATEGORIES__.Main defaultValue="0" __defaultText="Choose Category" editLink=false]-->
                </div>
                <!--[/if]-->
                <!--[if pnConfigGetVar('multilingual') eq 1]-->
                <div class="z-formrow">
                    <label for="event_language"><!--[gt text="Language"]--></label>
                    <!--[html_select_languages id=event_language name=event[language] all=true installed=true selected=$language]-->
                </div>
                <!--[/if]-->
                <div class="z-formrow">
                    <label for="crpcalendar_event_image"><!--[gt text="Event image (.gif, .jpg, .png) - Max"]--> <!--[math equation="x/1024" x=$file_dimension format="%.1f"]--> <!--[gt text="KBytes"]--></label>
                    <input type="hidden" name="MAX_FILE_SIZE" value="<!--[$file_dimension]-->"/>
                    <input id="crpcalendar_event_image" name="event_image" type="file" size="32"/>
                    <em class="z-formnote"><!--[gt text="Image would be resized to"]--> <!--[$image_width]--> px</em>
                </div>
                <div class="z-formrow">
                    <label for="crpcalendar_image_caption"><!--[gt text="Image caption"]--></label>
                    <input id="crpcalendar_image_caption" class="z-form-text" name="event[image_caption]" type="text" size="32" maxlength="255" value="<!--[$image_caption|pnvarprephtmldisplay]-->" />
                    <em class="z-formnote"><!--[gt text="Image caption will be displayed only if an image is present"]--></em>
                </div>
                <div class="z-formrow">
                    <label for="crpcalendar_event_document"><!--[gt text="Event document"]--> <!--[math equation="x/1024" x=$document_dimension format="%.1f"]--> <!--[gt text="Kytes"]--></label>
                    <input type="hidden" name="MAX_FILE_SIZE" value="<!--[$document_dimension]-->"/>
                    <input id="crpcalendar_event_document" name="event_document" type="file" size="32"/>
                </div>
                <div class="z-formrow">
                    <label for="crpcalendar_event_text"><!--[gt text="Content"]--> <span class="z-mandatorysym"><!--[if $mandatory_description]-->*<!--[/if]--></span></label>
                    <textarea id="crpcalendar_event_text" class="z-form-text" name="event[event_text]" rows="10" cols="50"><!--[$event_text|pnvarprepfordisplay]--></textarea>
                </div>
                <div class="z-formrow">
                    <label for="crpcalendar_day_event"><!--[gt text="Day event"]--></label>
                    <!--[if $day_event eq 1]-->
                    <input id="crpcalendar_day_event" name="event[day_event]" type="checkbox" value="1" checked="checked" />
                    <!--[else]-->
                    <input id="crpcalendar_day_event" name="event[day_event]" type="checkbox" value="1" />
                    <!--[/if]-->
                </div>
                <div class="z-formrow" id="start_date_block">
                    <label><!--[gt text="Start date"]--></label>
                    <div>
                        <!--[if $startYear]--><!--[assign var="start_date" value=$startYear|cat:"-"|cat:$startMonth|cat:"-"|cat:$startDay|cat:" "|cat:$startHour|cat:":"|cat:$startMinute]--><!--[/if]-->
                        <!--[html_select_date prefix="start" end_year="+4" time=$start_date field_array=event display_months=false display_years=false id="start_datefield-dd"]-->
                        <!--[html_select_date prefix="start" end_year="+4" time=$start_date field_array=event display_days=false display_years=false id="start_datefield-mm"]-->
                        <!--[html_select_date prefix="start" start_year="-4" end_year="+4" time=$start_date field_array=event display_days=false display_months=false id="start_datefield" class="highlight-days-67 no-transparency split-date"]-->&nbsp;&nbsp;<!--[html_select_time prefix="start" minute_interval="15" use_24_hours=true display_seconds=no time=$start_date field_array=event]-->
                    </div>
                </div>
                <div class="z-formrow" id="end_date_block">
                    <label><!--[gt text="End date"]--></label>
                    <div>
                        <!--[if $endYear]--><!--[assign var="end_date" value=$endYear|cat:"-"|cat:$endMonth|cat:"-"|cat:$endDay|cat:" "|cat:$endHour|cat:":"|cat:$endMinute]--><!--[/if]-->
                        <!--[html_select_date prefix="end" end_year="+4" time=$end_date field_array=event display_months=false display_years=false id="end_datefield-dd"]-->
                        <!--[html_select_date prefix="end" end_year="+4" time=$end_date field_array=event display_days=false display_years=false id="end_datefield-mm"]-->
                        <!--[html_select_date prefix="end" start_year="-4" end_year="+4" time=$end_date field_array=event display_days=false display_months=false id="end_datefield" class="highlight-days-67 no-transparency split-date"]-->&nbsp;&nbsp;<!--[html_select_time prefix="end" minute_interval="15" use_24_hours=true display_seconds=no time=$end_date field_array=event]-->
                    </div>
                </div>
                <!--[pnmodcallhooks hookobject=item hookaction=new module=crpCalendar]-->
            </fieldset>
            <div class="z-formbuttons">
                <!--[pnbutton src='button_ok.gif' set='icons/small' __alt="Create" __title="Create"]-->
                <a href="<!--[pnmodurl modname=crpCalendar type=admin func=view]-->"><!--[pnimg modname='core' src='button_cancel.gif' set='icons/small'   __alt="Cancel" __title="Cancel"]--></a>
            </div>
        </div>
    </form>

    <script type="text/javascript">
        Event.observe(window, 'load', function(){crpCalendarFormInit();}, false);
    </script>

</div>